﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyAjax._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="displayDIV">
    </div>
    </form>
    <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            var httpHandler = "MyHandler.ashx";   // request URL
            var params = { "control": "HelloWorld.ascx" };        // parameters
            var type = "text";                      // type, "xml", "html", "script", "json", "jsonp",  "text".
            var callBack = function (data, status) { // call back function
                $("#displayDIV").html(data);
            };

            $.get(httpHandler, params, callBack, type);
        })
    </script>
</body>
</html>
